package org.carabiner.mockutil;

import java.lang.reflect.InvocationTargetException;

import org.jmock.core.Invocation;

public class StubInvocationException extends RuntimeException
{
  public StubInvocationException(Invocation invocation,
      InvocationTargetException cause)
  {
    super("Error while invoking stubbed method: "
        + invocation.invokedMethod.getName(), cause.getCause());
  }

  public StubInvocationException(Invocation invocation,
      IllegalAccessException cause)
  {
    super("Error while invoking stubbed method: "
        + invocation.invokedMethod.getName(), cause.getCause());
  }

}
